package com.rc.saas.tenant.mapper.acct;

import com.rc.saas.tenant.common.base.BaseMapper;
import com.rc.saas.tenant.model.acct.AcctWithdrawApply;
import com.rc.saas.tenant.model.acct.AcctWithdrawApplyExample;
import com.rc.saas.tenant.model.acct.AcctWithdrawInvoice;
import com.rc.saas.tenant.search.acct.AcctWithdrawApplySearch;
import com.rc.saas.tenant.vo.acct.AcctBillOrderResultVo;
import com.rc.saas.tenant.vo.acct.AcctWithdrawApplyResult;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface AcctWithdrawApplyMapper extends BaseMapper<Long, AcctWithdrawApply, AcctWithdrawApplyExample> {
    List<AcctWithdrawApplyResult> listPageAcctWithdrawApply(AcctWithdrawApplySearch acctBankSearch);

    AcctWithdrawApplyResult selectAcctWithdrawApply(Long withdrawApplyId);

    void insertReturnId(AcctWithdrawApply apply);

    List<AcctWithdrawApplyResult> listExportAcctWithdrawApply(AcctWithdrawApplySearch acctWithdrawApplySearch);

    List<AcctBillOrderResultVo> listBillOrderByWithdrawApplyId(Long withdrawApplyId);

    List<AcctWithdrawInvoice> listInvoiceByWithdrawApplyId(Long withdrawApplyId);

    BigDecimal sumWithdrawWaitAmount(String tenantOperatorCode);

    int countByNotReviewedWithdrowApplyOrder(@Param("tenantCode") String tenantCode);
}